<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>
<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("navigator") . ( substr("navigator",-1,1) != "/" ? "/" : "" ) . basename("navigator") );?>

<div id = "container">
	<h1 class = "header">ผลการประเมินของผู้ประเมินภายนอก</h1>

	<div class = "sidebar-assessment">
	<br>
	<?php $counter1=-1; if( isset($group) && is_array($group) && sizeof($group) ) foreach( $group as $key1 => $value1 ){ $counter1++; ?>
		<h3><a href = "evaluation.php?id=<?php echo $value1["id"];?>"><?php echo $value1["name"];?></a></h3>
	<?php } ?>
	</div>

	<div class = "center" id = "evaluation">
		<button class="print">พิมพ์รายงาน</button>
		<h2><?php echo $group[$id-1][name];?></h2>
		<form action = "evaluation-update.php" method = "post">
			<input type = "hidden" name = "gid" value = "<?php echo $id;?>">
			<div class = "center" id = "evaluation">
				<table cellpadding = "0" cellspacing = "0" border = "0" class = "list">
					<tr>
						<td class = "head">จุดแข็ง / แนวทางเสริมจุดแข็ง</td>
						<?php if( $user['level_name']=='board' ){ ?>
						<td><textarea class = "h100 w350" name = "strength"><?php echo $evaluation["strength"];?></textarea></td>
						<?php }else{ ?>
						<td class = "h100 w350"><?php echo $evaluation["strength"];?></td>
						<?php } ?>
					</tr>
					<tr>
						<td class = "head">จุดที่ควรพัฒนา / ข้อแนะนำในการปรับปรุง</td>
						<?php if( $user['level_name']=='board' ){ ?>
						<td><textarea class = "h100 w350" name = "developed"><?php echo $evaluation["developed"];?></textarea></td>
						<?php }else{ ?>
						<td class = "h100 w350"><?php echo $evaluation["developed"];?></td>
						<?php } ?>
					</tr>
					<tr>
						<td class = "head">แนวทางปฏิบัติที่ดี / นวัตกรรม (ถ้ามี)</td>
						<?php if( $user['level_name']=='board' ){ ?>
						<td><textarea class = "h100 w350" name = "innovation"><?php echo $evaluation["innovation"];?></textarea></td>
						<?php }else{ ?>
						<td class = "h100 w350"><?php echo $evaluation["innovation"];?></td>
						<?php } ?>
					</tr>
					<tr>
						<td class = "head">ข้อเสนอแนะ</td>
						<?php if( $user['level_name']=='board' ){ ?>
						<td><textarea class = "h100 w350" name = "suggestion"><?php echo $evaluation["suggestion"];?></textarea></td>
						<?php }else{ ?>
						<td class = "h100 w350"><?php echo $evaluation["suggestion"];?></td>
						<?php } ?>
					</tr>
				</table>
				<?php if( $user['level_name'] == 'board' ){ ?>
				<input type = "submit" value = "ตกลง">
				<?php } ?>
			</div>
		</form>
	</div>

	<div class = "clear"></div>
</div>
<script>
	$('.print').popupWindow({ 
		windowURL:'http://127.0.0.1/kpi/evaluation.php?id=<?php echo $id;?>&mode=preview',
		windowName:'preview',
		width : 700,
		scrollbars : 1,
	});
</script>
<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>